package LeetCode;

public class LC_461_HammingDistance {

    public static void main(String[] args) {

    }

    class Solution {
        int hammingDistance(int x, int y) {
            int i = x ^ y;
            int count = 0;
            while (i != 0) {
                ++count;
                i = (i - 1) & i;
            }
            return count;
        }

    }
}